package com.sxt.controller;

import com.sxt.domain.MyResult;
import com.sxt.service.SchoolsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/schools")
public class SchoolsController {
    @Autowired
    private SchoolsService schoolsService;

    @RequestMapping("/findSchools")
    public MyResult findSchools(@RequestParam(defaultValue = "0") int pid){
        return schoolsService.selectMenusByPid(pid);
    }
}
